package com.module.organization.dao;

import java.util.ArrayList;
import java.util.List;

import org.hibernate.Query;
import org.hibernate.Session;

import com.module.organization.vo.Creditimg;

import base.dao.GenericHibernateDao;

public class CreditImgDao extends GenericHibernateDao<Creditimg,Long>{
	private CreditImgDao(){}
	
	private static CreditImgDao dao;
	
	public synchronized static CreditImgDao getInstance(){
		if(dao == null )
			dao = new CreditImgDao();
		return dao;
	}
	public List<Creditimg> getList(Session session,long id){
		StringBuffer sb = new StringBuffer();
		sb.append("from Creditimg where creditId="+id + " order by title");
		Query query = session.createQuery(sb.toString());
		List<Creditimg> list = query.list();
		return list;
		
	}
	
}
